home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 271_02 / getpath.doc < prev    next >
Text File  |  1987-08-18  |  1KB  |  39 lines

  1.  
  2.  
  3.         NAME
  4.                 getpath -- retrieve the PATH variable and parse
  5.  
  6.         SYNOPSIS
  7.                 c = getpath(string);
  8.                 int c;          count of characters returned in string
  9.                 char *string[]; destination for parsed string. Minimum 128
  10.                                 bytes, but longer paths could clobber this.
  11.  
  12.         DESCRIPTION
  13.         This function extracts the PATH variable (if it exists) and makes
  14.         a "pseudo-array" at destination string.  All semi-colon separators
  15.         are replaced by NULL bytes.  The returned integer count totals
  16.         all characters inserted into the string including NULLS, and
  17.         should be used to determine the exact end of the string, since
  18.         a NULL byte will not determine this.
  19.  
  20.         EXAMPLE
  21.                 char *string[135];
  22.                 int count;
  23.                 count = getpath(string);
  24.  
  25.          count will return as zero if no PATH is found.
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.         This function is found in SMTCx.LIB for the Turbo-C Compiler.
  39.